﻿using System;

namespace Firefly.Framework.Input
{
    public abstract class ButtonMapEventArgs : EventArgs
    {
        public bool IsUp { get; set; }
        public bool IsDown { get; set; }
        public bool WasPressed { get; set; }
        public bool WasReleased { get; set; }
        public bool WasHeld { get; set; }

        public ButtonMapEventArgs()
        {
        }

        public ButtonMapEventArgs(bool isUp, bool isDown, bool wasPressed, bool wasReleased, bool wasHeld)
        {
            IsUp = isUp;
            IsDown = isDown;
            WasPressed = wasPressed;
            WasReleased = wasReleased;
            WasHeld = wasHeld;
        }

        public ButtonMapEventArgs(IButtonMap buttonMap)
        {
            IsUp = buttonMap.IsMapUp;
            IsDown = buttonMap.IsMapDown;
            WasPressed = buttonMap.WasMapPressed;
            WasReleased = buttonMap.WasMapReleased;
            WasHeld = buttonMap.WasMapHeld;
        }
    }
}
